package com.jyh.aop01.service.controller;

import com.jyh.aop01.service.annotation.MyAnno;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.annotation.Retention;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/11 16:48
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @PostMapping("/list")
    @MyAnno("list")
    public String list(){
        System.out.println("查询用户");
        return "list";
    }

    @PostMapping("/save")
    @MyAnno("save")
    public String save(){
        System.out.println("添加用户");
        return "save";
    }
}
